package com.party.notify.notifyPush.event;

import com.party.core.model.crowdfund.ProjectWithAuthor;
import com.party.core.service.crowdfund.IProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 众筹成功推送
 * Created by wei.li
 *
 * @date 2017/10/31 0031
 * @time 17:33
 */

@Service
@Component(value = "eventSuccessCrowdfundService")
public class EventSuccessCrowdfundService extends INotifyEventSendService {

    private final static String SUCCESS_CROWDFUND = "successCrowdfundPush";

    @Autowired
    private IProjectService projectService;

    /**
     * 众筹列表
     * @return 列表数据
     */
    @Override
    public List<ProjectWithAuthor> getList(String eventId) {
        return projectService.eventSuccessList(eventId);
    }

    /**
     * 事件代码
     * @return 事件代码
     */
    @Override
    public String eventCode() {
        return SUCCESS_CROWDFUND;
    }
}
